package com.controller;

import com.entity.ConfigEntity;
import com.ex.MyException;
import com.service.ConfigService;
import top.appx.easysql.EasysqlException;
import top.appx.easysql.Restrain;
import top.appx.espring.annotation.Action;
import top.appx.espring.annotation.Autowired;
import top.appx.espring.annotation.Controller;
import top.appx.espring.vo.QueryPageVO;
import top.appx.espring.vo.ResultVO;

import javax.servlet.http.HttpServletRequest;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;


@Controller("/Config")
public class ConfigController extends BaseController<ConfigEntity> {

    @Autowired
    private ConfigService configService;
    @Action("queryPage")
    public Object queryPage(HttpServletRequest request){
        return configService.queryPage(requestQueryPageVO(request));
    }

    @Action("add")
    public void add(ConfigEntity configEntity){
        configService.add(configEntity);
    }
    @Action("modify")
    public void modify(ConfigEntity configEntity){
        configService.modify(configEntity);
    }
    @Action("delById")
    public void delById(ConfigEntity configEntity){
        configService.delById(configEntity.getId());
    }

}
